package com.nmsl.medicine.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.nmsl.common.annotation.Excel;
import com.nmsl.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 出库记录详情对象 storage_out_detail_record
 * 
 * @author ruoyi
 * @date 2025-02-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class StorageOutDetailRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 出库记录详情id */
    private Long storageOutDetailId;

    /** 出库单号 （药品出库记录表） */
    @Excel(name = "出库单号 ", readConverterExp = "药=品出库记录表")
    private Long storageOutId;

    /** 药品id （药品表） */
    @Excel(name = "药品id ", readConverterExp = "药=品表")
    private Long medicineId;

    /** 出库数量 */
    @Excel(name = "出库数量")
    private Long storageOutQuantity;

    /** 药品名称  **/
    private String medicineName;

    /** 药品类别 **/
    private String categoryName;


    /** 药品规格 */
    private String medicineSpecification;

    /** 生产厂家 */
    private String manufacturerName;

    /** 采购价 */
    private Double purchasePrice;

    /** 零售价 */
    private Double retailPrice;

    /** 采购总价 **/
    private Double AllpurchasePrice;

    /** 售卖总价 **/
    private Double AllRetailPrice;


    /** 药品有效期 */
    @JsonFormat(pattern ="yyy-MM-dd")
    private Date validityPeriod;

    public void getAll(){

        this.AllpurchasePrice=this.purchasePrice*this.storageOutQuantity;
        this.AllRetailPrice=this.retailPrice*this.storageOutQuantity;

    }
}
